package com.lyb.mapper;

import com.lyb.pojo.UserRole;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserRoleMapper {
    @Insert("insert into user_role (userId,roleId) values (#{userId},#{roleId})")
    Boolean add(Integer userId,Long roleId);
    @Select("select * from user_role where userId=#{id}")
    UserRole findByUserId(Long id);
}
